package com.laosg.study.base.ch1

/**
  * Created by kaimin on 3/5/2019.
  * time : 12:56
  */
object UnitNullNothingDemo {
  def main(args: Array[String]): Unit = {

    var res=sum(2,2)
    println("res="+res)
    var a:Int=4
    var name:String="12";
    println(name.charAt(0))
    println(name*3)
    println(10.max(2))
    println(3.5.toInt)
    println(10/3)
    println(10%3)
    println(-10%3)  //a%b=a-a/b*b 取莫运算的根本
    a+=1
    println(a)
  }
  def hello():Unit={
    println("hello")
  }

  def sum(a:Int ,b:Int):Int={
    return a+b
  }
}
